'use strict';
const webpack = require('webpack');
const merge = require('webpack-merge');
const webpackBase = require('./webpack.base');
const CleanWebpackPlugin = require('clean-webpack-plugin'); // 删除dist 目录
const webpackDll = require('./webpack.dll');

module.exports = merge(webpackBase,webpackDll, {
  mode: "production",

  plugins: [
    // 删除dist打包目录
    new CleanWebpackPlugin(),
    new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
    new webpack.DefinePlugin({
      'process.env': {
        'NODE_ENV': JSON.stringify('production'),
      }
    }),
  ]

})